<template>
	<view>
		<detailPage
			:pageUrl="pageUrl"
			:editFormOptions="editFormOptions"
			:editFormFields="editFormFields"
			:detailColumns="detailColumns"
			@masterDate="masterDate"
			:titel="titel"
		></detailPage>
	</view>
</template>
<script>
export default {
	data() {
		return {
			titel: '',
			pageUrl: 'q_operations_contract',
			editFormFields: {
				Voucher_sub: '',
				Goods_num: '',
				Total_price: '',
				Tax_exclusive_total_price: '',
				Supplier: ''
			},
			editFormOptions: [
				{
					title: 'ID',
					required: true,
					field: 'Operations_contract',
					hidden: true,
					readonly: true
				},
				{
					title: '订单编码',
					field: 'Voucher_sub',
					readonly: true
				},
				{
					title: '客户名称',
					field: 'Client_name',
					readonly: true,
					data: [],
					key: '客户'
				},{
					title: '站点名称',
					field: 'Site',
					readonly: true
				},{
					title: '联系人',
					field: 'Client_man',
					readonly: true
				},{
					title: '电话',
					field: 'Client_tel',
					readonly: true
				},{
					title: '省',
					field: 'Province',
					readonly: true,
					data: [],
					key: '省'
				},{
					title: '市',
					field: 'City',
					readonly: true,
					data: [],
					key: '省'
				},{
					title: '区',
					field: 'District',
					readonly: true,
					data: [],
					key: '省'
				},{
					title: '地址',
					field: 'Client_addr',
					readonly: true
				},{
					title: '总价',
					field: 'Total_price',
					readonly: true
				},
				{
					title: '数量',
					field: 'Goods_num',
					readonly: true
				},{
					title: '合同状态',
					field: 'state',
					readonly: true,
					data: [],
					key: '合同期限状态'
				},
			],
			detailColumns: [
				{
					field: 'Operations_contractList',
					title: 'ID',
					hidden: true
				},
				{
					field: 'Brand',
					title: '设备品牌',
					type: 'string'
				},
				{
					field: 'Type',
					title: '设备类型',
					require: true
				},

				{
					field: 'Model',
					title: '设备型号',
					require: true
				},
				{
					field: 'Price',
					title: '价格',
					require: true
				},
				{
					field: 'Goods_num',
					title: '数量',
					type: 'string',
					require: true
				}
			]
		};
	},
	methods: {
		masterDate(val) {
			Object.assign(this.editFormFields, val);
		}
	}
};
</script>
